package cn.bonoon.kernel.io.synchronize;



/**
 * 支持服务器方式进行同步的
 * @author jackson
 *
 */
public abstract class AbstractFileSynchronizeServer<T> extends AbstractFileSynchronizeTask{

	protected final static int BUFFERED_SIZE = 1024;
	
	/** 文件同步服务器地址 */
	protected String host;
	/** 文件同步服务器端口，如果为0，则使用默认端口 */
	protected int port;
	/** 登录的用户名 */
	protected String username;
	/** 登录密码 */
	protected String password;

	/** 与服务器连接传输文件的时间超时设置 */
	protected int connectedTimeout = 1000 * 30; 

	protected ThreadLocal<T> clientThreadLocal = new ThreadLocal<T>();

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setConnectedTimeout(int connectedTimeout) {
		this.connectedTimeout = connectedTimeout;
	}
}
